package com.caizi.base.utils;

/**
 * 统一返回结果状态信息类
 *
 */
public enum ResultCodeEnum {

    SUCCESS(200,"success"),
    ERROR(404,"error"),
    ERROR_500(500,"unknownError"),
    USERNAME_ERROR(501,"usernameError"),
    NOTLOGIN(502,"notLogin"),
    NO_PERMISSION(503,"noPermission"),
    DATABASE_ERROR(300,"databaseError"),
    PARAMETER_ERROR(301,"parameterError"),
    UNKNOWN_ERROR(305,"unknownError");

    private Integer code;
    private String message;
    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}
